<?php
if(!defined('InEmpireCMS'))
{
	exit();
}

//--------------- 界面参数 ---------------

//会员界面附件地址前缀
$memberskinurl=$public_r['newsurl'].'skin/member/images/';

//LOGO图片地址
$logoimgurl=$memberskinurl.'logo.jpg';

//加减号图片地址
$addimgurl=$memberskinurl.'add.gif';
$noaddimgurl=$memberskinurl.'noadd.gif';


//其它色调可修改CSS部分

//--------------- 界面参数 ---------------


//识别并显示当前菜单
function EcmsShowThisMemberMenu(){
	global $memberskinurl,$noaddimgurl;
	$selffile=eReturnSelfPage(0);
	if(stristr($selffile,'/member/msg'))
	{
		$menuname='menumsg';
	}
	elseif(stristr($selffile,'e/DoInfo'))
	{
		$menuname='menuinfo';
	}
	elseif(stristr($selffile,'/member/mspace'))
	{
		$menuname='menuspace';
	}
	elseif(stristr($selffile,'e/ShopSys'))
	{
		$menuname='menushop';
	}
	elseif(stristr($selffile,'e/payapi')||stristr($selffile,'/member/buygroup')||stristr($selffile,'/member/card')||stristr($selffile,'/member/buybak')||stristr($selffile,'/member/downbak'))
	{
		$menuname='menupay';
	}
	else
	{
		$menuname='menumember';
	}
	echo'<script>turnit(do'.$menuname.',"'.$menuname.'img");</script>';
	?>
	<script>
	do<?=$menuname?>.style.display="";
	document.images.<?=$menuname?>img.src="<?=$noaddimgurl?>";
	</script>
	<?php
}

//网页标题
$thispagetitle=$public_diyr['pagetitle']?$public_diyr['pagetitle']:'会员中心';
//会员信息
$tmgetuserid=(int)getcvar('mluserid');	//用户ID
$tmgetusername=RepPostVar(getcvar('mlusername'));	//用户名
$tmgetgroupid=(int)getcvar('mlgroupid');	//用户组ID
$tmgetgroupname='游客';
//会员组名称
if($tmgetgroupid)
{
	$tmgetgroupname=$level_r[$tmgetgroupid]['groupname'];
	if(!$tmgetgroupname)
	{
		include_once(ECMS_PATH.'e/data/dbcache/MemberLevel.php');
		$tmgetgroupname=$level_r[$tmgetgroupid]['groupname'];
	}
}

//模型
$tgetmid=(int)$_GET['mid'];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title><?=$thispagetitle?></title>
<link href="<?=$public_r[newsurl]?>skin/default/css/common.css" rel="stylesheet" type="text/css" />

<style>

/*分页样式*/
.epages{margin:3px 0;font:11px/12px Tahoma}
.epages *{vertical-align:middle;}
.epages a{padding:1px 4px 1px;border:1px solid #A6CBE7;margin:0 1px 0 0;text-align:center;text-decoration:none;font:normal 12px/14px verdana;}
.epages a:hover{border:#659B28 1px solid;background:#f3f8ef;text-decoration:none;color:#004c7d}
.epages input{margin-bottom:0px;border:1px solid #659B28;height:15px;font:bold 12px/15px Verdana;padding-bottom:1px;padding-left:1px;margin-right:1px;color:#659B28;}


.homeTop{ margin-bottom:20px;}
.home_user_pic{float:left;}
.home_user_pic img{border-radius: 50%;width:80px;height:80px;}
.home_user_info{margin-left:116px;}
.home_user_name{font-size:24px; margin-bottom:15px;color:#fff;}
.home_user_xq{color:#fff;}
.homeTop_w{ padding:50px 0;}
.home_nav_box{ background:#fff;	}
.home_nav_box,.home_nav_box ul{height:72px;}
.home_nav_li{display:inline-block;margin-right:20px;}
.home_nav_li a{height:72px;display:inline-block;line-height:72px;font-size:18px;margin-right:40px;border-bottom:3px solid #fff;}
.home_nav_box .cur a{border-bottom-color:#dd2727;color:#dd2727;}
.home_top_left{float:left;}
.home_top_right{float:right;}
</style>

<SCRIPT lanuage="JScript">
function DisplayImg(ss,imgname,phome)
{
	if(imgname=="menumemberimg")
	{
		img=todisplay(domenumember,phome);
		document.images.menumemberimg.src=img;
	}
	else if(imgname=="menumsgimg")
	{
		img=todisplay(domenumsg,phome);
		document.images.menumsgimg.src=img;
	}
	else if(imgname=="menuinfoimg")
	{
		img=todisplay(domenuinfo,phome);
		document.images.menuinfoimg.src=img;
	}
	else if(imgname=="menuspaceimg")
	{
		img=todisplay(domenuspace,phome);
		document.images.menuspaceimg.src=img;
	}
	else if(imgname=="menupayimg")
	{
		img=todisplay(domenupay,phome);
		document.images.menupayimg.src=img;
	}
	else if(imgname=="menushopimg")
	{
		img=todisplay(domenushop,phome);
		document.images.menushopimg.src=img;
	}
	else
	{
	}
	DisplayAllMenu(imgname);
}
function todisplay(ss,phome)
{
	if(ss.style.display=="") 
	{
  		ss.style.display="none";
		theimg="<?=$addimgurl?>";
	}
	else
	{
  		ss.style.display="";
		theimg="<?=$noaddimgurl?>";
	}
	return theimg;
}
function turnit(ss,img)
{
	DisplayImg(ss,img,0);
}
function DisplayAllMenu(imgname)
{
	if(imgname!='menumemberimg'&&domenumember.style.display=="")
	{
		domenumember.style.display="none";
		document.images.menumemberimg.src="<?=$addimgurl?>";
	}
	if(imgname!='menumsgimg'&&domenumsg.style.display=="")
	{
		domenumsg.style.display="none";
		document.images.menumsgimg.src="<?=$addimgurl?>";
	}
	if(imgname!='menuinfoimg'&&domenuinfo.style.display=="")
	{
		domenuinfo.style.display="none";
		document.images.menuinfoimg.src="<?=$addimgurl?>";
	}
	if(imgname!='menuspaceimg'&&domenuspace.style.display=="")
	{
		domenuspace.style.display="none";
		document.images.menuspaceimg.src="<?=$addimgurl?>";
	}
	if(imgname!='menupayimg'&&domenupay.style.display=="")
	{
		domenupay.style.display="none";
		document.images.menupayimg.src="<?=$addimgurl?>";
	}
	if(imgname!='menushopimg'&&domenushop.style.display=="")
	{
		domenushop.style.display="none";
		document.images.menushopimg.src="<?=$addimgurl?>";
	}
}
</SCRIPT>
</head>
<body leftmargin="0" topmargin="0">
<div class="head">
	<div class="center">
		<div class="logo">
			<a href="http://www.pngtu8.com"><img src="/png/skin/default/images/logo.png"/></a>
		</div>
		<div class="nav">
			<ul class="nav_ul">
				<li><a href="<?=$public_r[newsurl]?>">首页</a></li>
				<?php
					$homenav=$empire->query("select classid,classname,classpath,showclass from {$dbtbpre}enewsclass where bclassid=0 and showclass=0 order by myorder,classid desc",0,24,0);
					while($tmodr=$empire->fetch($homenav))
						{
				?>
					 <li><a href="<?=$public_r[newsurl]?><?=$tmodr['classpath']?>"><?=$tmodr['classname']?></a><li>
				<?php
					}
				?>  
			</ul>
		</div>
		<div class="user" id="_userloginx">
			<?php
			if($tmgetuserid)//已登录
			{
			?>
			<div class="userinfo_box">
				<div class="userinfo">
					<img src="<?=$userpic?>" class="vam"><a href="javascript:;" class="vam"><?=$tmgetusername?></strong></a>
				</div>
				<div class="userNav">
					<ul>
						<li><a href="<?=$public_r[newsurl]?>e/member/cp/" target=_blank>个人中心</a></li>
						<li><a href="<?=$public_r[newsurl]?>e/member/fava/" target=_blank>我的收藏</a></li>
						<li><a href="<?=$public_r[newsurl]?>e/member/msg/" target=_blank>短信息</a></li>
						<li><a href="<?=$public_r[newsurl]?>e/member/doaction.php?enews=exit&ecmsfrom=9" onclick="return confirm('确认要退出?');">退出登录</a> </li>
					</ul>
				</div>
			</div>
			<?php
			}
			else	//游客
			{
			?>
			<div class="user_f ft_16">
				<a class="btn btn_line_bbb" href="<?=$public_r[newsurl]?>e/member/login">登录</a>
				<a class="btn btn_line" href="<?=$public_r[newsurl]?>e/member/register/ChangeRegister.php">注册</a>
			</div>
			<?php
			}
			?>
		</div>
	</div>
</div>

<div class="homeTop" style="background:url(<?=$public_r['newsurl']?>skin/member/images/homebg.jpg) center bottom;padding-top:100px;">
	<div class="homeTop_w center row">
		<div class="home_top_left">
			<div class="home_user">
				<div class="home_user_pic">
					<a href="###"><img src="<?=$userpic?>" alt="您的形象"/></a>
				</div>
				<div class="home_user_info">
					<div class="home_user_name"><?=$user[username]?></div>
					<div class="home_user_xq">
						<?=$level_r[$r[groupid]][groupname]?>
					</div>
				</div>
			</div>
		</div>
		<div class="home_top_right">
		
			<a class="btn" href="<?=$public_r[newsurl]?>e/DoInfo/AddInfo.php?mid=2&enews=MAddInfo&classid=11">分享素材</a>
		</div>
	</div>
	<div class="home_nav_box">
		<ul class="center">
			<li class="home_nav_li cur"><a href="<?=$public_r['newsurl']?>e/member/">我的收藏</a></li>
			<li class="home_nav_li"><a href="<?=$public_r['newsurl']?>e/member/downbak/">下载记录</a></li>
			<li class="home_nav_li"><a href="<?=$public_r['newsurl']?>e/DoInfo/ListInfo.php?mid=2">我的上传</a></li>
			<li class="home_nav_li"><a href="<?=$public_r['newsurl']?>e/member/msg/">消息</a></li>
			<li class="home_nav_li"><a href="<?=$public_r['newsurl']?>e/member/buygroup/">会员升级</a></li>
		<ul>
	</div>
</div>

